<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>DN_MOUSECLICK</title>
<meta http-equiv="Content-Type" Content="text/html; charset=utf-8">
<link rel="stylesheet" type="text/css" href="../../../styles/styles.css">
<script language="javascript" src='../../links.js' type="text/javascript"></script>
</head>
<body>

<h1>DN_MOUSECLICK</h1>
<div class=navbar>
<a  href="index_dn.html">Events</a> |
<a href="../index.html">Dialog API</a><br>
</div>

<div class=shortdescr>
The <dfn>DN_MOUSECLICK</dfn> event is sent to the dialog callback function after the user clicks
the mouse on one of the dialog items or outside the dialog.
</div>

<h3>Param1</h3>
<div class=descr>
Dialog item ID or -1 if the user clicked outside the dialog.
</div>

<h3>Param2</h3>
<div class=descr>
Pointer to a <a href="../../winapi/mouse_event_record.html">MOUSE_EVENT_RECORD</a> structure.
</div>

<h3>Return</h3>
<div class=descr>
TRUE  - the dialog callback function has handled the message, no further processing by the kernel is needed.<br>
FALSE - continue processing the message by the kernel.

</div>

<h3>Controls</h3>
<div class=descr>
<table class="cont">
<tr class="cont"><th class="cont" width="40%">Control</th><th class="cont" width="60%">Description</th></tr>
<tr class="cont"><td class="cont" width="40%">All</td>
<td class="cont" width="60%">All dialog elements excluding hidden and disabled</td></tr>
</table>
</div>

<h3>Remarks</h3>
<div class=descr>
<ol>
<li>For the <a href="../controls/di_usercontrol.html">DI_USERCONTROL</a> control the mouse cursor
coordinates are relative to the upper left corner of the control. For all other elements the
coordinates are relative to the upper left corner of the screen.

<li>The dialog callback function can handle the DOUBLE_CLICK event. For this you should check the
<code>MouseEvent.dwEventFlags==DOUBLE_CLICK</code> flag:

<li>If the user clicks outside the dialog, then:
    <ul>
     <li>the left mouse button is treated as if <code>&lt;Esc&gt;</code> was pressed;
     <li>the right mouse button is treated as if <code>&lt;Enter&gt;</code> was pressed;
     <li>other mouse buttons are ignored (for a multiple button mice).
     <li>If the dialog callback function doesn't handle the message with ID=-1, the
         dialog will be closed
    </ul>
</ol>
</div>

<h3>Example</h3>
<div class=descr>

</div>


<div class=see>See also:</div><div class=seecont>
<a href="../dialogex.html">DialogEx</a><br>

</div>

</body>
</html>
